Optimal. Leaf size=319 \[ -\frac {a^4 (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )}{b^3 (n+1) (b c-a d) (b e-a f)}+\frac {\left (a^2 d^2+a b c d+b^2 c^2\right ) (e+f x)^{n+1}}{b^3 d^3 f (n+1)}+\frac {e (a d+b c) (e+f x)^{n+1}}{b^2 d^2 f^2 (n+1)}-\frac {(a d+b c) (e+f x)^{n+2}}{b^2 d^2 f^2 (n+2)}+\frac {c^4 (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {d (e+f x)}{d e-c f}\right )}{d^3 (n+1) (b c-a d) (d e-c f)}+\frac {e^2 (e+f x)^{n+1}}{b d f^3 (n+1)}-\frac {2 e (e+f x)^{n+2}}{b d f^3 (n+2)}+\frac {(e+f x)^{n+3}}{b d f^3 (n+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.28, antiderivative size = 319, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {180, 43, 68} \[ \frac {\left (a^2 d^2+a b c d+b^2 c^2\right ) (e+f x)^{n+1}}{b^3 d^3 f (n+1)}-\frac {a^4 (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )}{b^3 (n+1) (b c-a d) (b e-a f)}+\frac {e (a d+b c) (e+f x)^{n+1}}{b^2 d^2 f^2 (n+1)}-\frac {(a d+b c) (e+f x)^{n+2}}{b^2 d^2 f^2 (n+2)}+\frac {c^4 (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {d (e+f x)}{d e-c f}\right )}{d^3 (n+1) (b c-a d) (d e-c f)}+\frac {e^2 (e+f x)^{n+1}}{b d f^3 (n+1)}-\frac {2 e (e+f x)^{n+2}}{b d f^3 (n+2)}+\frac {(e+f x)^{n+3}}{b d f^3 (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 68
Rule 180
Rubi steps
\begin {align*} \int \frac {x^4 (e+f x)^n}{(a+b x) (c+d x)} \, dx &=\int \left (\frac {\left (b^2 c^2+a b c d+a^2 d^2\right ) (e+f x)^n}{b^3 d^3}-\frac {(b c+a d) x (e+f x)^n}{b^2 d^2}+\frac {x^2 (e+f x)^n}{b d}+\frac {a^4 (e+f x)^n}{b^3 (b c-a d) (a+b x)}+\frac {c^4 (e+f x)^n}{d^3 (-b c+a d) (c+d x)}\right ) \, dx\\ &=\frac {\left (b^2 c^2+a b c d+a^2 d^2\right ) (e+f x)^{1+n}}{b^3 d^3 f (1+n)}+\frac {\int x^2 (e+f x)^n \, dx}{b d}+\frac {a^4 \int \frac {(e+f x)^n}{a+b x} \, dx}{b^3 (b c-a d)}-\frac {c^4 \int \frac {(e+f x)^n}{c+d x} \, dx}{d^3 (b c-a d)}-\frac {(b c+a d) \int x (e+f x)^n \, dx}{b^2 d^2}\\ &=\frac {\left (b^2 c^2+a b c d+a^2 d^2\right ) (e+f x)^{1+n}}{b^3 d^3 f (1+n)}-\frac {a^4 (e+f x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{b^3 (b c-a d) (b e-a f) (1+n)}+\frac {c^4 (e+f x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {d (e+f x)}{d e-c f}\right )}{d^3 (b c-a d) (d e-c f) (1+n)}+\frac {\int \left (\frac {e^2 (e+f x)^n}{f^2}-\frac {2 e (e+f x)^{1+n}}{f^2}+\frac {(e+f x)^{2+n}}{f^2}\right ) \, dx}{b d}-\frac {(b c+a d) \int \left (-\frac {e (e+f x)^n}{f}+\frac {(e+f x)^{1+n}}{f}\right ) \, dx}{b^2 d^2}\\ &=\frac {e^2 (e+f x)^{1+n}}{b d f^3 (1+n)}+\frac {(b c+a d) e (e+f x)^{1+n}}{b^2 d^2 f^2 (1+n)}+\frac {\left (b^2 c^2+a b c d+a^2 d^2\right ) (e+f x)^{1+n}}{b^3 d^3 f (1+n)}-\frac {2 e (e+f x)^{2+n}}{b d f^3 (2+n)}-\frac {(b c+a d) (e+f x)^{2+n}}{b^2 d^2 f^2 (2+n)}+\frac {(e+f x)^{3+n}}{b d f^3 (3+n)}-\frac {a^4 (e+f x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{b^3 (b c-a d) (b e-a f) (1+n)}+\frac {c^4 (e+f x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {d (e+f x)}{d e-c f}\right )}{d^3 (b c-a d) (d e-c f) (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.99, size = 285, normalized size = 0.89 \[ \frac {(e+f x)^{n+1} \left (\frac {b^3 c^4 f^3 \left (n^2+5 n+6\right ) \, _2F_1\left (1,n+1;n+2;\frac {d (e+f x)}{d e-c f}\right )-(b c-a d) (c f-d e) \left (a^2 d^2 f^2 \left (n^2+5 n+6\right )+a b d f (n+3) (c f (n+2)+d (e-f (n+1) x))+b^2 \left (c^2 f^2 \left (n^2+5 n+6\right )+c d f (n+3) (e-f (n+1) x)+d^2 \left (2 e^2-2 e f (n+1) x+f^2 \left (n^2+3 n+2\right ) x^2\right )\right )\right )}{f^3 (n+2) (n+3) (a d-b c) (c f-d e)}-\frac {a^4 d^3 \, _2F_1\left (1,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )}{(b c-a d) (b e-a f)}\right )}{b^3 d^3 (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.80, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (f x + e\right )}^{n} x^{4}}{b d x^{2} + a c + {\left (b c + a d\right )} x}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )}^{n} x^{4}}{{\left (b x + a\right )} {\left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.26, size = 0, normalized size = 0.00 \[ \int \frac {x^{4} \left (f x +e \right )^{n}}{\left (b x +a \right ) \left (d x +c \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )}^{n} x^{4}}{{\left (b x + a\right )} {\left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x^4\,{\left (e+f\,x\right )}^n}{\left (a+b\,x\right )\,\left (c+d\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: HeuristicGCDFailed} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________